﻿using SmartPlant.Core;
using SmartPlant.Core.Mvvm;
using SmartPlant.Modules.Base.ViewModels;
using System.Windows;
using Telerik.Windows.Controls;
using Telerik.Windows.Controls.Docking;

namespace SmartPlant.Modules.Base.Views
{
    /// <summary>
    /// DrawingDoc.xaml 的交互逻辑
    /// </summary>
    public partial class DrawingDoc : RadDocumentPane, IPaneModel, ICanClosedDocumentView
    {
        public DrawingDoc()
        {
            InitializeComponent();
            this.Unloaded += RadDocumentPane_Unloaded;
      
        }

        public DockState Position => DockState.DockedLeft;

        private void RadDocumentPane_Unloaded(object sender, System.Windows.RoutedEventArgs e)
        { 
            //这里肯定拿不到，因为此时 viewmodel已经被释放了
            if (DataContext is DrawingDocViewModel viewModel)
            {
                
            }
        }

    
    }
}
